package io.bitmax.exchange.login.model;

import android.text.TextUtils;

import io.bitmax.exchange.R;
import io.bitmax.exchange.base.model.BaseModel;
import io.bitmax.library.utils.ToastUtils;

/**
 * Created by Administrator on 2018/9/26.
 */

public class LoginModel extends BaseModel {

    private boolean checkPwdNoneNull(String pwd) {
        if (TextUtils.isEmpty(pwd.trim())) {
            ToastUtils.showToast(resources.getString(R.string.app_password_cannot_null));
            return false;
        }

        return true;
    }

    public boolean checkLogin(String phone, String pwd) {
        return checkPhone(phone) && checkPwdNoneNull(pwd);
    }
}
